﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using MobiSms.ViewModel;
using System.Windows.Data;

namespace MobiSms.Wasun.Views
{
    public partial class MessageComposeView : PhoneApplicationPage
    {
        MessageComposeViewModel viewmodel;

        public MessageComposeView()
        {
            InitializeComponent();
            viewmodel = (MessageComposeViewModel)LayoutRoot.DataContext;
        }

        private void checkBox_Checked(object sender, RoutedEventArgs e)
        {
            //viewmodel.ChangeStatus((sender as CheckBox).Tag.ToString(), (sender as CheckBox).IsChecked == true ? true : false);
        }

        private void OnTextBoxTextChanged(object sender, TextChangedEventArgs e)
        {
            TextBox box = sender as TextBox;
            BindingExpression binding = box.GetBindingExpression(TextBox.TextProperty);
            binding.UpdateSource();
        }
    }
}